package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.reggie.common.R;
import com.itheima.reggie.entity.Employee;

import javax.servlet.http.HttpServletRequest;

/**
 * Created with IntelliJ IDEA.
 * User: zjz
 * Date: 2022/07/09 16:57
 * Description:
 * Version: V1.0
 */
public interface EmployeeService extends IService<Employee> {

    /**
     * 新增员工
     * @param employee
     * @param request
     * @return
     */
    R<String> save(Employee employee,HttpServletRequest request);

    /**
     * 员工登录
     * @param username 员工姓名
     * @param password 密码
     * @param request request
     * @return
     */
    R<Employee> login(String username, String password, HttpServletRequest request);


    /**
     * 员工退出
     * @param request request
     * @return
     */
    R<String> logout(HttpServletRequest request);

    /**
     * 员工信息分页查询
     * @param page
     * @param pageSize
     * @param name
     * @return
     */
    R<Page> page(int page , int pageSize , String name);
}
